package cn.wsalix.templet.service.impl;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import cn.anlaser.service.impl.SimpleServiceImpl;
import cn.anlaser.utils.SearchFilter;
import cn.wsalix.templet.entity.ProSiteTemplet;
import cn.wsalix.templet.entity.SiteTemplet;
import cn.wsalix.templet.form.ProSiteTempletForm;
import cn.wsalix.templet.repository.ProSiteTempletRepository;
import cn.wsalix.templet.service.ProSiteTempletService;
import cn.wsalix.templet.service.SiteInfoService;
import cn.wsalix.templet.service.SiteTempletService;
import cn.wsalix.templet.service.TempletService;

@Service("proSiteTempletService")
@Transactional(readOnly = true)
public class ProSiteTempletServiceImpl extends
		SimpleServiceImpl<ProSiteTempletForm,ProSiteTempletRepository, ProSiteTemplet> implements
		ProSiteTempletService {

	@Autowired
	private ProSiteTempletRepository proSiteTempletRepository;
	@Autowired
	private SiteTempletService siteTempletService;
	@Autowired
	private SiteInfoService siteService;
	@Autowired
	private TempletService templetService;

	@Override
	public ProSiteTempletRepository getRepository() {
		return proSiteTempletRepository;
	}

	@Override
	public String module() {
		return "prositetemplet";
	}

	@Override
	public SiteTemplet findByIdAndCode(Long projectId, String proSiteCode) {
		ProSiteTemplet proSiteTemplet = proSiteTempletRepository
				.findByIdAndCode(projectId, proSiteCode);
		return proSiteTemplet.getSiteTemplet();
	}

	@Override
	public List<ProSiteTemplet> findProTempletByid(Long projectId) {
		return proSiteTempletRepository.findByProjectId(projectId);
	}

	@Override
	public ProSiteTemplet findByProSiteCode(String proSiteCode) {
		return proSiteTempletRepository.findByProSiteCode(proSiteCode);
	}

	@Override
	public List<ProSiteTemplet> findByStId(Long stId) {
		return proSiteTempletRepository.findByStId(stId);
	}

	@Override
	public Class<ProSiteTemplet> getEntityClazz() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Map<String, SearchFilter> buildByForm(ProSiteTempletForm form) {
		// TODO Auto-generated method stub
		return null;
	}
	

}
